export const invoiceType = [
  {
    value: '1',
    label: '已生效',
    style: 'fc-success'
  },
  {
    value: '2',
    label: '回收作废',
    style: 'fc-error'
  }
]

export const base = info => {
  return [
    { name: '开票日期', label: 'makeTime', valueClass: 'vm  ' },
    {
      name: '开票笔数',
      valueClass: 'vm  ',
      // label: 'makeType',
      render: (h, row, index) => {
        const makeType =
          info.form.makeType === '1'
            ? '单笔销售单开票'
            : '多笔销售单合并开票'
        return [<div class=" ">{makeType}</div>]
      }
    },
    { name: '销售单号', label: 'saleOrderNo', valueClass: 'vm  ' },
    {
      name: '关联客户',
      valueClass: 'vm  ',
      // label: 'customerName',
      render: (h, row, index) => {
        return [
          <el-button
            type="text"
            size="mini"
            class="pt10"
            onClick={() => {
              info.onExtendShow(info.form.customerId, 'customer')
            }}
          >
            {info.form.customerName}
          </el-button>
        ]
      }
    },
    { name: '销售单总额', label: 'saleTotalPrice', valueClass: 'vm  ' },
    {
      name: '实际应收',
      label: 'realitySaleTotalPrice',
      valueClass: 'vm  '
    },
    { name: '已开票金额', label: 'invoiceAmount', valueClass: 'vm  ' },
    { name: '开票金额', label: 'amount', valueClass: 'vm  ' },
    { name: '开票主体', label: 'invoiceMain', valueClass: 'vm  ' },
    { name: '我方信息', label: 'ourInformationName', valueClass: 'vm  ' },
    { name: '票据类型', label: 'invoiceTypeName', valueClass: 'vm  ' },
    { name: '纳税人识别号', label: 'identifyNumber', valueClass: 'vm  ' },
    { name: '发票号码', label: 'invoiceNumber', valueClass: 'vm  ' },
    { name: '发票代码', label: 'invoiceCoding', valueClass: 'vm  ' },
    { name: '票据内容', label: 'billRemark', valueClass: 'vm  ' },
    { name: '地址、电话', label: 'address', valueClass: 'vm  ' },
    { name: '开户行及账号', label: 'openingAccount', valueClass: 'vm  ' },
    {
      name: '相关附件',
      // label: 'accessory',
      valueClass: 'vm  ',
      render: (h, row, index) => {
        return [
          info.form.accessory ? (
            <el-button
              type="text"
              size="mini"
              class="pt10"
              onClick={() => {
                info.onExport()
              }}
            >
              {info.form.accessoryName}
            </el-button>
          ) : (
            <div class=" ">无附件</div>
          )
        ]
      }
    },
    { name: '备注信息', label: 'remark', valueClass: 'vm  ' }
  ]
}
